<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.staticfile.org/angular.js/1.4.6/angular.min.js"></script>
    <title>Document</title>
</head>
<body>
    <div ng-app="myApp" ng-controller="myCtrl">
        <!-- ng-app初始化应用程序,让其在div标签内运行 -->
        <!-- ng-controller="myCtrl"用来定义一个控制器 -->
        {{name}}
    </div>
    <script>
        var app = angular.module('myApp',[]) 
        app.controller('myCtrl',function($scope){
            // $scope用来保存Angular的对象 对象内部存储着需要用的变量
            $scope.name = '小脑残'
        })
    </script>
</body>
</html>